package com.example.iceserverdemo.utils;

import java.util.ArrayList;
import java.util.Map;

public class MapUtil {
    public static <TKey, TValue> ArrayList<TValue> getReverseValues(Map<TKey, TValue> map) {
        Object[] array = map.values().toArray();
        ArrayList<TValue> values = new ArrayList();
        for (int index = array.length - 1; index >= 0; index--)
            values.add((TValue) array[index]);
        return values;
    }
}
